<script setup>
import { onMounted, ref, watch } from 'vue'
const props = defineProps(['course'])
</script>

<template>
    <div class="container">
        <div class="img-container">
            <img class="course-picture" :src="course.largePicture" alt="">
            <div class="new" v-show="course.newTagStatus === 'opened'"></div>
        </div>
        <div class="info">
            <div class="title">{{ course.title }}</div>
            <div class="other">
                <div class="price">￥{{ course.price }}</div>
                <div class="learnNum">{{ course.studentNum }} 人在学</div>
            </div>
        </div>
    </div>
</template>

<style scoped>
.container {
    display: flex;
    flex-direction: row;
    /* height: 73px; */
    box-shadow: 0 2px 8px 0 rgba(0,0,0,.1);
    border-radius: 8px;
    /* margin: 0 0 8px 0; */
    /* margin: 8px; */
    padding: 8px;
    background: #fff!important;
}

.img-container .course-picture {
    width: 125px;
    height: 73px;
    border-radius: 4px;
    object-fit: cover;
}

.info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-left: 10px;
    flex: 1;
    /* position: relative;
    top: -2px; */
}

.info .title {
    font-size: 14px;
    color: #363636;
    font-weight: 400 !important;
    max-height: 43px;
    word-wrap: break-word;
    overflow: hidden;
}

.info .other {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.info .price {
    color: #ff6262;
    font-family: Gilroy-ExtraBold;
    font-size: 18px;
    line-height: 22px;
    font-weight: 800;
}

.info .learnNum {
    color: #8e8e93;
    font-size: 10px;
}
</style>